package com.dandan.testcollection.touch;

import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.ViewGroup;
import android.widget.LinearLayout;

/**
 * Created by Dandan on 2018/6/22.
 */

public class ViewGroupTouchTest extends LinearLayout
{


    public ViewGroupTouchTest(Context context) {
        super(context);
    }

    public ViewGroupTouchTest(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public ViewGroupTouchTest(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }


    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        if(ev.getAction() == MotionEvent.ACTION_MOVE)
            return true;
        return super.dispatchTouchEvent(ev);
    }
}
